package com.springboot.example.web;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;

/**
 * 作者: guo yao
 * 日期: 2016年01月14日
 * 时间: 下午14:45
 */
@SpringBootApplication
public class SpringBootMain extends SpringBootServletInitializer implements CommandLineRunner {


    @Override
    public void run(String... strings) throws Exception {
        // 执行一些代码
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(SpringBootMain.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(SpringBootMain.class, args);
    }

}
